<template>
  <div>
    <div class="wrap" @click="handleMask">
      <swiper :options='swiperOptions' class="swiper-wrap">
        <swiper-slide v-for="(item,index) in gallaryImgs" :key="index">
          <img :src="item" class="item-img">
        </swiper-slide>
        <div class="swiper-pagination" slot="pagination"></div>
      </swiper>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    gallaryImgs: Array
  },
  name: 'gallary',
  data () {
    return {
      swiperOptions: {
        pagination: '.swiper-pagination',
        paginationType: 'fraction',
        observeParents: true,
        observer: true
      }
    }
  },
  methods: {
    handleMask () {
      this.$emit('changestatue')
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrap
    z-index:99;
    position:absolute
    display: flex;
    flex-direction:column;
    justify-content:center;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    .swiper-wrap
      width: 100%;
      .item-img
        width: 100%;

</style>
